package cn.gjxblog.web.servlet.mvc.demo1.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 *  BeanNameUrlHandlerMapping
 *  SimpleServletHandlerAdapter
 */

@Controller("/UserController2")
public class UserController2 implements org.springframework.web.servlet.mvc.Controller {

    @Override
    public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("key",123);
        return modelAndView;
    }
}
